package heima3_2.cn.osc.presenter;

import java.util.List;

import heima3_2.cn.osc.base.OurTabBaseFragment;
import heima3_2.cn.osc.base.OurTabBasePresenter;
import heima3_2.cn.osc.model.bean.CollectBean;
import retrofit2.Call;
import retrofit2.Response;

/**
 * Created by yaozhanlie on 2017/1/18.
 */

public class CollectInfoPresenter extends OurTabBasePresenter<CollectBean, CollectBean.FavoriteBean> {
    @Override
    protected void doRetrofitQuest() {
        Call<CollectBean> collectInfo = mRetrofitInterface.getCollectInfo5();
        collectInfo.enqueue(mCallback);
    }

    @Override
    public List<CollectBean.FavoriteBean> getDataBean(Response<CollectBean> response) {
        return response.body().getFavorites();
    }

    public CollectInfoPresenter(OurTabBaseFragment ourTabBaseFragment) {
        super(ourTabBaseFragment);
    }
}
